<script src="./page.js"></script>
<style lang="less" rel="stylesheet/less" scoped>
    @import "./page.less";
</style>

<template>
<div class="card-panel">
	<div class="container">
		<el-upload
			action="https://jsonplaceholder.typicode.com/posts/"
			list-type="picture-card"
			name
			:on-preview="handlePictureCardPreview"
			:on-remove="handleRemove">
			<i class="el-icon-plus"></i>
			<el-button type="primary" class="btn-block submit-btn add-btn">上传合同</el-button>
		</el-upload>
	</div>
	<el-dialog :visible.sync="dialogVisible" :width="isPdf ? '90%' : '70%'">
		<img width="100%" :src="dialogImageUrl" alt="" v-if="!isPdf">
		<object :data="dialogImageUrl" type="application/pdf" width="100%" height="800px" v-else>
			<iframe :src="dialogImageUrl" width="100%" height="100%" style="border: none;">
			该浏览器不支持PDFs，请单击查看: 
				<a :href="dialogImageUrl">Download PDF</a>
			</iframe>
		</object>
	</el-dialog>
</div>
</template>
